<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <title></title>
    <meta name="keywords" content="关键字">
    <meta name="description" content="描述">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telphone=no, email=no">
    <script type="text/javascript" src="../../lib/mod.js"></script>
    <style type="text/css">
    canvas {
        border: 2px solid red;
    }
    </style>
</head>

<body>
    <canvas width="400" height="400" id="canvas1"></canvas>
    <canvas width="400" height="400" id="canvas2"></canvas>
    <br>
    <input id="text" type="text" name="" value="" placeholder="">
    <input id="submit" type="submit" name="" value="开始">
    <script type="text/javascript">
    var threed = require('particle');
    var submit = document.querySelector('#submit');
    submit.addEventListener('click', function() {
        var text = document.querySelector('#text').value.trim();
        new threed("#canvas1").drawtext(text, 1);
    })
    </script>
</body>

</html>
